//
//  ALGPSManager.h
//  ALUtils_Example
//
//  Created by hcs on 2018/12/3.
//  Copyright © 2018年 anlun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "ALPlacemark.h"

typedef void (^ALGPSCoorClosure) (CLLocationDegrees latitude, CLLocationDegrees longitude);
typedef void (^ALGPSPlacemarkClosure) (ALPlacemark *placemark);
@interface ALGPSManager : NSObject <CLLocationManagerDelegate>
/// 定位回调
+ (void)getGPSLocation:(ALGPSCoorClosure)closure;

/// 停止定位
+ (void)stop;

/// 是否启用定位服务
+ (BOOL)locationServicesEnabled;

/// 反向地理编码获取地址信息
+ (void)getPlacemarkWithLatitude:(NSString *)latitude longitude:(NSString *)longitude closure:(ALGPSPlacemarkClosure)closure;

/// 反向地理编码获取地址信息
+ (void)getPlacemarkWithCoordinate2D:(CLLocationCoordinate2D)coor closure:(ALGPSPlacemarkClosure)closure;

/// 地理编码获取经纬度
+ (void)getGPSLocationWithAddress:(NSString *)address closure:(ALGPSCoorClosure)closure;
@end

